import request from ".."

export const getCoffeeList = async (params?:any) => { 
  return await request.get('/coffee',params)
}

export const getCoffeeDetail = async (id:number) => { 
  return await request.get(`/coffee/detail/${id}`)
}

export const createCoffee = async (data:any) => { 
  return await request.post('/coffee',data)
}

export const updateCoffee = async (id:number,data:any) => { 
  return await request.put(`/coffee/${id}`,data)
}
export const deleteCoffee = async (id:number) => { 
  return await request.delete(`/coffee/${id}`)
}

export const changeCoffeeStatus = async(id:number)=>{
  return await request.put('/coffee/change_status/'+id)
}

export const changeCoffeeRecommend = async(id:number)=>{
  return await request.put('/coffee/change_recommend/'+id)
}